﻿<internal:BaseControlPartView x:Class="UColor.WPF.Internal.BaseControlModulesPageView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:ddhelpers="clr-namespace:UColor.Core.Helpers;assembly=UColor.Core"
    xmlns:internal="clr-namespace:UColor.WPF.Internal"
    xmlns:helpers="clr-namespace:UCOLOR.Helpers"
    xmlns:local="clr-namespace:UCOLOR.App.Extend"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    mc:Ignorable="d" xmlns:my="clr-namespace:UCOLOR.View" d:DesignHeight="761" d:DesignWidth="1026" xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol">
    <internal:BaseControlPartView.Resources>
        <local:ScalablePaddingConverter x:Key="ScalablePaddingConverter"/>
        <helpers:StringFormatConverter x:Key="StringFormatConverter" />
        <helpers:ImageSourceConverter x:Key="ImageSourceConverter" />
        <Style x:Key="VerticalTile" TargetType="dxlc:Tile">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Size" Value="Small" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate />
                </Setter.Value>
            </Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="16" Margin="0,5,0,0" HorizontalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="HorizontalTile" TargetType="dxlc:Tile">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Size" Value="Large" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate />
                </Setter.Value>
            </Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="14" Margin="20,0,0,0" VerticalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="FlatTile" TargetType="dxlc:Tile">
            <Setter Property="Size" Value="Large" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="VerticalHeaderAlignment" Value="Stretch" />
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="16" Margin="0,5,0,0" HorizontalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </internal:BaseControlPartView.Resources>
    <Border>
        <Border.Background>
            <LinearGradientBrush EndPoint="0.625,1.051" StartPoint="0.304,-0.187">
                <GradientStop Color="#FF544765" />
                <GradientStop Color="#FF453F57" Offset="1" />
                <GradientStop Color="#FF221F2C" Offset="0.3" />
            </LinearGradientBrush>
        </Border.Background>
    <DockPanel LastChildFill="True">
        <Grid Background="#FF544765" DockPanel.Dock="Top" Name="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="701*" />
                <ColumnDefinition Width="45*" />
                <ColumnDefinition Width="280*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="100" />
            </Grid.RowDefinitions>
            <Image Grid.Column="0" Grid.Row="0" HorizontalAlignment="left" Margin="2,2,2,2" Name="logo" Stretch="None" />
            <StackPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" Name="toolbar" Orientation="Horizontal" />
            <TextBox CaretBrush="#FF229393" ClipToBounds="False" FontSize="12" FontStretch="Normal" Grid.Column="2" Height="30" HorizontalAlignment="Right" IsManipulationEnabled="True" Margin="0,34,15,36" MinLines="2" Name="tbSearch" Text="搜索" VerticalAlignment="Center" VerticalContentAlignment="Center" Width="203" />
            <dxlc:Tile Background="#FF6652A2" Content="欢迎使用..." dxlc:FlowLayoutControl.IsFlowBreak="True" Header="欢迎使用..." HorizontalAlignment="Left" Margin="6,10,0,6" Size="Large" Style="{StaticResource HorizontalTile}" Width="310" />
            <dxlc:Tile Background="#FF6652A2" dxlc:FlowLayoutControl.IsFlowBreak="True" Header="用户登录" HorizontalAlignment="Left" Margin="330,10,0,6" Size="Small" Style="{StaticResource HorizontalTile}" Width="146" />
            <dxlc:Tile Background="#FF6652A2" dxlc:FlowLayoutControl.IsFlowBreak="True" Header="首页" HorizontalAlignment="Left" Margin="492,10,0,6" Size="Small" Style="{StaticResource HorizontalTile}" Width="146" Click="Tile_Click" MouseDown="Tile_MouseDown" />
        </Grid>
            <Grid Background="#FF544765" Name="Center">
            <Grid Height="auto" Name="LayoutRoot" Width="auto">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="330" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                </Grid.RowDefinitions>
                <dxlc:TileLayoutControl Grid.ColumnSpan="2" Height="Auto" Margin="0,0,0,0" Padding="10" >
                    <dxlc:TileLayoutControl.Resources>
                        <Style TargetType="dxlc:Tile">
                            <Setter Property="dx:ContentControlBase.ContentTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <TextBlock FontFamily="Segoe UI Light" FontSize="40" Text="{Binding}" />
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="dxlc:MaximizableHeaderedContentControlBase.MaximizedContentTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <StackPanel Margin="16" Orientation="Vertical">
                                            <TextBlock FontFamily="Segoe UI Light" FontSize="48" Text="{Binding}" />
                                            <TextBlock FontSize="14" TextWrapping="Wrap">You can define an alternative content template when Tile is maximized using the MaximizedContentTemplate property.</TextBlock>
                                        </StackPanel>
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Control.HorizontalContentAlignment" Value="Center" />
                            <Setter Property="Control.VerticalContentAlignment" Value="Center" />
                        </Style>
                        <SolidColorBrush Color="#FFDA8515" x:Key="color2" />
                        <SolidColorBrush Color="#FF54AF0E" x:Key="color3" />
                    </dxlc:TileLayoutControl.Resources>
                    <dxlc:Tile Background="#FF6652A2"  Content="站内消息" FontSize="18" Height="123" Width="310" />
                    <dxlc:Tile Content="公告" Height="119" />
                    <dxlc:Tile Background="#FF6652A2" Content="活动" Height="115" />
                    <dxlc:Tile Background="#FF54AF0E" Command="{Binding ShowSystemInfoCommand}" Header="设置" Style="{StaticResource VerticalTile}">
                        <BitmapImage UriSource="../Images/System.png" />
                    </dxlc:Tile>
                    <dxlc:Tile Background="#FF6652A2" Command="{Binding ShowStatisticsCommand}" Content="用户中心" Size="Small" />
                </dxlc:TileLayoutControl>
                <Grid Background="#FF544765" Grid.Column="1" Name="DataCenter">
                        <Grid Background="#FF544765" Height="auto" Margin="0,10,10,0
                          " Name="grid1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="350" />
                            <ColumnDefinition Width="200" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Border BorderBrush="#FF515151" BorderThickness="1" Grid.Column="0" Margin="10,10,10,10" Padding="0">
                            <dxlc:TileLayoutControl AllowItemMoving="True" BreakFlowToFit="True" ItemsSource="{Binding data}" Margin="10,10,10,10" Name="G01" Orientation="Vertical" Padding="0">
                                <dxlc:TileLayoutControl.ItemTemplate>
                                    <DataTemplate>
                                        <dxlc:Tile  Content="{Binding}" Header="{Binding}" Height="150" Padding="0" helpers:TileSelectHelper.ComparisonPropertyPath="ID" Click="ProductTile_Click" Uid="{Binding item_no}" VerticalHeaderAlignment="Stretch" Width="150" helpers:ZoomHelper.SupressZoomFactor="300">
                                            <dxlc:Tile.ContentTemplate>
                                                <DataTemplate>
                                                    <Image Source="{Binding PhotoSource}" Stretch="UniformToFill" />
                                                </DataTemplate>
                                            </dxlc:Tile.ContentTemplate>
                                            <dxlc:Tile.HeaderTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <helpers:VisualStateControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                                            <Grid>
                                                                <Border Opacity="0.25" />
                                                                <Grid />
                                                            </Grid>
                                                        </helpers:VisualStateControl>
                                                        <Grid IsHitTestVisible="False" Visibility="{Binding Path=(helpers:TileSelectHelper.IsSelected), RelativeSource={RelativeSource AncestorType=dxlc:Tile}}">
                                                            <Border Background="Transparent" BorderThickness="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                        </Grid>
                                                    </Grid>
                                                </DataTemplate>
                                            </dxlc:Tile.HeaderTemplate>
                                        </dxlc:Tile>
                                    </DataTemplate>
                                </dxlc:TileLayoutControl.ItemTemplate>
                                
                            </dxlc:TileLayoutControl>
                        </Border>
                        <Border BorderBrush="#FF515151" BorderThickness="1" Grid.Column="1" Margin="10,10,10,10" Padding="0">
                            <dxlc:TileLayoutControl AllowItemMoving="True" BreakFlowToFit="True" ItemsSource="{Binding data}" Margin="10,10,10,10" Name="G02" Orientation="Vertical" Padding="0">
                                <dxlc:TileLayoutControl.ItemTemplate>
                                    <DataTemplate>
                                        <dxlc:Tile  Content="{Binding}" Header="{Binding}" Height="150" Padding="0" helpers:TileSelectHelper.ComparisonPropertyPath="ID" Click="ProductTile_Click" Uid="{Binding item_no}"   VerticalHeaderAlignment="Stretch" Width="150" helpers:ZoomHelper.SupressZoomFactor="300">
                                            <dxlc:Tile.ContentTemplate>
                                                <DataTemplate>
                                                    <Image Source="{Binding PhotoSource}" Stretch="UniformToFill"/>
                                                </DataTemplate>
                                            </dxlc:Tile.ContentTemplate>
                                            <dxlc:Tile.HeaderTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <helpers:VisualStateControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                                            <Grid>
                                                                <Border Opacity="0.25" />
                                                                <Grid />
                                                            </Grid>
                                                        </helpers:VisualStateControl>
                                                        <Grid IsHitTestVisible="False" Visibility="{Binding Path=(helpers:TileSelectHelper.IsSelected), RelativeSource={RelativeSource AncestorType=dxlc:Tile}}">
                                                            <Border Background="Transparent" BorderThickness="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                        </Grid>
                                                    </Grid>
                                                </DataTemplate>
                                            </dxlc:Tile.HeaderTemplate>
                                        </dxlc:Tile>
                                    </DataTemplate>
                                </dxlc:TileLayoutControl.ItemTemplate>
                            </dxlc:TileLayoutControl>
                        </Border>
                        <Border BorderBrush="#FF515151" BorderThickness="1" Grid.Column="2" Margin="10,10,10,10" Padding="0">
                            <dxlc:TileLayoutControl AllowItemMoving="True" BreakFlowToFit="True" ItemsSource="{Binding data}" Margin="10,10,10,10" Name="G03" Orientation="Vertical" Padding="0">
                                <dxlc:TileLayoutControl.ItemTemplate>
                                    <DataTemplate>
                                        <dxlc:Tile  Content="{Binding}" Header="{Binding}" Height="150" Padding="0" helpers:TileSelectHelper.ComparisonPropertyPath="ID" Click="DirTile_Click" Uid="{Binding item_no}"  VerticalHeaderAlignment="Stretch" Width="150" helpers:ZoomHelper.SupressZoomFactor="300">
                                            <dxlc:Tile.ContentTemplate>
                                                <DataTemplate>
                                                    <Image Source="{Binding PhotoSource}" Stretch="UniformToFill" />
                                                </DataTemplate>
                                            </dxlc:Tile.ContentTemplate>
                                            <dxlc:Tile.HeaderTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <helpers:VisualStateControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                                            <Grid>
                                                                <Border Opacity="0.25" />
                                                                <Grid />
                                                            </Grid>
                                                        </helpers:VisualStateControl>
                                                        <Grid IsHitTestVisible="False" Visibility="{Binding Path=(helpers:TileSelectHelper.IsSelected), RelativeSource={RelativeSource AncestorType=dxlc:Tile}}">
                                                            <Border Background="Transparent" BorderThickness="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                        </Grid>
                                                    </Grid>
                                                </DataTemplate>
                                            </dxlc:Tile.HeaderTemplate>
                                        </dxlc:Tile>
                                    </DataTemplate>
                                </dxlc:TileLayoutControl.ItemTemplate>
                            </dxlc:TileLayoutControl>
                        </Border>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
    </DockPanel>
    </Border>
    
</internal:BaseControlPartView>
